[#203] TodoEditorView에서 수정 시 최초 값과 다를 때만 서버에 업데이트될 수 있도록 버튼을 제한한다#205
[#203] TodoEditorView에서 수정 시 최초 값과 다를 때만 서버에 업데이트될 수 있도록 버튼을 제한한다#205
Conversation
opficdev
commented
Mar 6, 2026
- closed TodoEditorView에서 수정 시 최초 값과 다를 때만 서버에 업데이트될 수 있도록 버튼을 제한한다 #203
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 Todo 편집 화면에서 사용자가 내용을 수정했을 때, 최초 값과 다를 경우에만 서버에 업데이트 요청을 보낼 수 있도록 제출 버튼의 활성화 로직을 개선합니다. 이를 통해 불필요한 서버 호출을 줄이고 사용자 경험을 향상시킵니다. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 TodoEditorView에서 할 일을 수정할 때, 내용이 실제로 변경되었을 경우에만 '저장' 버튼이 활성화되도록 하는 기능을 구현했습니다. 이를 위해 Todo의 초기 상태를 저장하는 Draft 구조체를 도입하고, 현재 상태와 비교하여 변경 여부를 판단하는 로직을 TodoEditorViewModel에 추가했습니다. 이 로직은 TodoEditorView에서 버튼의 활성화 상태를 제어하는 데 사용됩니다. 전반적으로 잘 구현되었으며, 불필요한 서버 업데이트를 방지하여 사용자 경험을 개선하는 좋은 변경입니다. 코드 개선을 위한 한 가지 작은 제안이 있습니다.
| private func submit() { | ||
| if !viewModel.isReadyToSubmit { return } | ||
| let todo = viewModel.makeTodo() | ||
| onSubmit?(todo) | ||
| dismiss() | ||
| } |